package com.app.util.db.util;

import com.app.util.string.Object2StringHandler;

/**
 * 将表名或字段名加上 `` 引号
 * 
 * @author yao
 */
public class SqlNameTranser implements Object2StringHandler {

	public static final SqlNameTranser IT = new SqlNameTranser();

	private SqlNameTranser() {
	}

	public String toString(Object obj) {
		String field = obj.toString();
		if (field.indexOf("`") != -1) {
			return field;
		} else { 
			return "`" + field + "`";
		}
	}

}
